package com.shangguan.springmvc.web.controller;

import com.shangguan.springmvc.core.StudentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @ClassName: FirstController
 * @Description:
 * @Author: 一尘
 * @Date: 2020 年 04 月 22 14:07
 * @Version 1.0
 */
@Controller
public class FirstController {
    
    @Autowired
    @Qualifier(value = "studentServer") //按照名称自动注入
    StudentServiceImpl studentService;
    
       /* @GetMapping("/hello")
            public  String hello(){

            return "welcome";
        }*/

       @GetMapping("/invoke")
        public String dosome(){
           System.out.println("--------------------------dosome---------------");
           studentService.say();
           return "welcome";
       }
}
